public class Dog {
     public String name;
     public int age;
    public void eat(){
        System.out.println(this.name+"正在吃骨头");
    }
    public void func(){
        this.eat();//this对当前对象成员方法的调用
    }
    public Dog(String name,int age){
        this.name=name;
        this.age=age;
        System.out.println("这里有两个参数");
    }
    public Dog(){
        this("lisi",2);
        System.out.println("this调用了当前对象的其他构造方法");
    }

    @Override
    public String toString() {
        return "Dog{" +
                "age=" + age +
                '}';
    }
}
